package com.hps.shiro.model;

import java.io.Serializable;
import javax.persistence.*;

@Table(name = "oauth2_client")
public class Client implements Serializable {
    @Id
    private Long id;

    /**
     * 客戶端名稱
     */
    @Column(name = "client_name")
    private String clientName;

    /**
     * 客戶端ID
     */
    @Column(name = "client_id")
    private String clientId;

    /**
     * 客户端安全key
     */
    @Column(name = "client_secret")
    private String clientSecret;

    private static final long serialVersionUID = 1L;

    /**
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取客戶端名稱
     *
     * @return client_name - 客戶端名稱
     */
    public String getClientName() {
        return clientName;
    }

    /**
     * 设置客戶端名稱
     *
     * @param clientName 客戶端名稱
     */
    public void setClientName(String clientName) {
        this.clientName = clientName == null ? null : clientName.trim();
    }

    /**
     * 获取客戶端ID
     *
     * @return client_id - 客戶端ID
     */
    public String getClientId() {
        return clientId;
    }

    /**
     * 设置客戶端ID
     *
     * @param clientId 客戶端ID
     */
    public void setClientId(String clientId) {
        this.clientId = clientId == null ? null : clientId.trim();
    }

    /**
     * 获取客户端安全key
     *
     * @return client_secret - 客户端安全key
     */
    public String getClientSecret() {
        return clientSecret;
    }

    /**
     * 设置客户端安全key
     *
     * @param clientSecret 客户端安全key
     */
    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret == null ? null : clientSecret.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", clientName=").append(clientName);
        sb.append(", clientId=").append(clientId);
        sb.append(", clientSecret=").append(clientSecret);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}